﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Newtonsoft.Json;
using CI.Domain.Models;

namespace Ci.Presentation.Web.Controllers
{
    public class PiezaDentalController : Controller
    {
        [HttpGet]
        public ActionResult GetPiezaDental(int nro)
        {
            DomainModelContext dataContext = new DomainModelContext();
            //buscar
            var piezadental = from p in dataContext.vwPiezaDentalZona
                               where p.nroPiezaDental == nro
                               select p;

            return Json(piezadental.ToList(), JsonRequestBehavior.AllowGet);
        }
    }
}
